package com.atjg.autocat.mqtt;

import android.content.ComponentName;
import android.content.ServiceConnection;
import android.os.IBinder;

import com.zhy.baselibrary.utils.Klog;

public class MyServiceConnection implements ServiceConnection {
    private IGetMessageCallBack IGetMessageCallBack;
    private MQTTService mqttService;

    @Override // android.content.ServiceConnection
    public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
        MQTTService service = ((MQTTService.CustomBinder) iBinder).getService();
        this.mqttService = service;
        service.setIGetMessageCallBack(this.IGetMessageCallBack);
    }

    @Override // android.content.ServiceConnection
    public void onServiceDisconnected(ComponentName componentName) {
    }

    public MQTTService getMqttService() {
        return this.mqttService;
    }

    public void setIGetMessageCallBack(IGetMessageCallBack IGetMessageCallBack) {
        this.IGetMessageCallBack = IGetMessageCallBack;
    }
}